#include "HostRight.h"

using namespace AgoraClient;

HostRight::HostRight(void)
{
	this->_right.resize(9);
}

HostRight::HostRight(const std::vector<bool>& right)
: _right(right)
{

}

HostRight::~HostRight(void)
{
}

void	HostRight::SetHostRight(const bool canChangeLogin, const bool canChangePassword, const bool canChangeChannel, const bool canCreateChannel, const bool canDeleteChannel, const bool canMoveChannel, const bool canKickUser, const bool canBanUser, const bool canEditUser)
{
	this->_right[0] = canChangeLogin;
	this->_right[1] = canChangePassword;
	this->_right[2] = canChangeChannel;
	this->_right[3] = canCreateChannel;
	this->_right[4] = canDeleteChannel;
	this->_right[5] = canMoveChannel;
	this->_right[6] = canKickUser;
	this->_right[7] = canBanUser;
	this->_right[8] = canEditUser;
}

const bool	HostRight::GetCanChangeLogin(void) const
{
	return this->_right[0];
}

void	HostRight::SetCanChangeLogin(const bool value)
{
	this->_right[0] = value;
}

const bool	HostRight::GetCanChangePassword(void) const
{
	return this->_right[1];
}

void	HostRight::SetCanChangePassword(const bool value)
{
	this->_right[1] = value;
}

//can modif host name, codec, bpassante, max user, reboot, etcetc

const bool	HostRight::GetCanChangeChannel(void) const
{
	return this->_right[2];
}

void	HostRight::SetCanChangeChannel(const bool value)
{
	this->_right[2] = value;
}

const bool	HostRight::GetCanCreateChannel(void) const
{
	return this->_right[3];
}

void	HostRight::SetCanCreateChannel(const bool value)
{
	this->_right[3] = value;
}

const bool	HostRight::GetCanDeleteChannel(void) const
{
	return this->_right[4];
}

void	HostRight::SetCanDeleteChannel(const bool value)
{
	this->_right[4] = value;
}

const bool	HostRight::GetCanMoveChannel(void) const
{
	return this->_right[5];
}

void	HostRight::SetCanMoveChannel(const bool value)
{
	this->_right[5] = value;
}

const bool	HostRight::GetCanKickUser(void) const
{
	return this->_right[6];
}

void	HostRight::SetCanKickUser(const bool value)
{
	this->_right[6] = value;
}

const bool	HostRight::GetCanBanUser(void) const
{
	return this->_right[7];
}

void	HostRight::SetCanBanUser(const bool value)
{
	this->_right[7] = value;
}

const bool	HostRight::GetCanEditUser(void) const
{
	return this->_right[8];
}

void	HostRight::SetCanEditUser(const bool value)
{
	this->_right[8] = value;
}
